package com.ys.erp.stage_user_service.config;

import com.junziqian.sdk.util.RequestUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.context.annotation.Bean;

/**
 * @author lwj
 * @date 2025/8/14
 */
@SpringBootConfiguration
@RefreshScope
public class JunZiQianConfig {

    @Value("${jzq.server-url}")
    private String serverUrl;

    @Value("${jzq.app-key}")
    private String appKey;

    @Value("${jzq.app-secret}")
    private String appSecret;

    @Bean("jzqRequestUtils")
    public RequestUtils getRequest() {
        return RequestUtils.init(serverUrl, appKey, appSecret);
    }

}
